'use strict';
/**
 * 增加一次操作成功统计累计次数
 */
exports.main = async (event, context) => {
	const db = uniCloud.database();
	let updateInfo = await db.collection('db-user-info').where({
		code: db.command.eq(event.code)
	}).updateAndReturn({
		accumulatedCount: db.command.inc(1)
	});
	return updateInfo.doc.accumulatedCount;
};